<%%
  submit_label = "Update"
  submit_label = "Create" if @<%= singular_name%>.new_record?
-%>

<%%= error_messages_for :<%= singular_name %> %>

<%% form_for(@<%= singular_name %>) do |f| %>
  <%%= render :partial => "data", :locals => {:f => f} %>
  <p> <%%= f.submit submit_label %> </p>
<%% end %>
